package com.wan37.logic.listener.event;

/**
 * @author : luoyong
 * @date : 2020-06-28 21:56
 **/
public abstract class BaseGameEvent {

    /**
     * 创建时间
     */
    private long createTime;
    /**
     * 事件类型
     */
    private final EventType eventType;

    public BaseGameEvent(EventType eventType) {
        this.createTime = System.currentTimeMillis();
        this.eventType = eventType;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public EventType getEventType() {
        return eventType;
    }

    /**
     * 是否在消息主线程同步执行
     *
     * @return
     */
    public boolean isSynchronized() {
        return true;
    }
}
